package com.gzh.teaching.model.vo;

import com.gzh.core.util.NumericHelper;
import com.gzh.teaching.service.dto.SaveReportIn;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @Author guanzh
 * @Date 2022/2/8 15:28
 * @Description
 */
@Setter
@Getter
@ToString
public class SaveReportParam {
    private String workId;

    private String fileId;

    private String type;

    private String answerId;

    public SaveReportIn paramToIn(Integer userId) {
        SaveReportIn in = new SaveReportIn();
        in.setWorkId(NumericHelper.toInteger(this.workId));
        in.setFileId(NumericHelper.toInteger(this.fileId));
        in.setType(NumericHelper.toInteger(this.type));
        in.setAnswerId(NumericHelper.toInteger(this.answerId));
        in.setUserId(userId);
        return in;
    }
}
